package de.ryancarmon.validator.exc;

import de.ryancarmon.validator.ValidatorParam;

public class UnsupportedValidationException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	private ValidatorParam param;

	public UnsupportedValidationException(ValidatorParam param) {
		if (param == null)
			throw new IllegalArgumentException("'param' may not be null");
		
		this.param = param;
	}

	@Override
	public String getMessage() {
		return String.format(
				"%s validation is not supported by this validator.", param);
	}
}
